

#ifndef MAIN_SHELL_H_
#define MAIN_SHELL_H_

#include <iostream.h>
#include "main.h"
#include "message_queue.h"


typedef int (* Shell_Callback_t)(Stream_t *stream, int argc, char *argv[]);

typedef struct
{
    const char *name;
    Shell_Callback_t callback;
}Shell_Cmd_t;

typedef struct
{
    Stream_t *stream;
    char till;
}Shell_LineInMsg_t;

void Shell_Init(const Shell_Cmd_t cmdList[]);
void Shell_OnLine(MsgQueue_Msg_t *msg);
int Shell_Help(Stream_t *stream, int argc, char *argv[]);
int Shell_Test(Stream_t *stream, int argc, char *argv[]);
int Shell_Reset(Stream_t *stream, int argc, char *argv[]);
int Shell_PowerOff(Stream_t *stream, int argc, char *argv[]);

#endif /* MAIN_SHELL_H_ */
